#define _CRT_SECURE_NO_WARNINGS 1
#include"DoubleList.h"


void Text1()
{
	/*DoubleListNode* plist = NULL;
	DoubleListInit(&plist);*/

	DoubleListNode* plist = DoubleListInit();

	DoubleListPushBack(plist, 1);
	DoubleListPushBack(plist, 2);
	DoubleListPushBack(plist, 3);
	DoubleListPushBack(plist, 4);
	DoubleListPushBack(plist, 5);

	DoubleListPrint(plist);

	DoubleListPushFront(plist, 10);
	DoubleListPushFront(plist, 20);
	DoubleListPushFront(plist, 30);
	DoubleListPushFront(plist, 40);

	DoubleListPrint(plist);

}

void Text2()
{
	DoubleListNode* plist = DoubleListInit();
	DoubleListPushBack(plist, 1);
	DoubleListPushBack(plist, 2);
	DoubleListPushBack(plist, 3);
	DoubleListPushBack(plist, 4);
	DoubleListPushBack(plist, 5);

	DoubleListPrint(plist);

	DoubleListPushFront(plist, 10);
	DoubleListPushFront(plist, 20);
	DoubleListPushFront(plist, 30);

	DoubleListPrint(plist);

	//DoubleListPopFront(plist);
	//DoubleListPopFront(plist);
	//DoubleListPopFront(plist);

	DoubleListPopBack(plist);
	DoubleListPopBack(plist);
	DoubleListPopBack(plist);

	DoubleListPrint(plist);

}

Text3()
{
	DoubleListNode* plist = DoubleListInit();
	DoubleListPushBack(plist, 1);
	DoubleListPushBack(plist, 2);
	DoubleListPushBack(plist, 3);
	DoubleListPushBack(plist, 4);
	DoubleListPushBack(plist, 5);

	DoubleListPrint(plist);

	DoubleListPopBack(plist);
	DoubleListPrint(plist);

	DoubleListPopBack(plist);
	DoubleListPrint(plist);

	DoubleListPopBack(plist);
	DoubleListPrint(plist);

	DoubleListPopBack(plist);
	DoubleListPrint(plist);

	DoubleListPopBack(plist);
	DoubleListPrint(plist);

	//DoubleListPopBack(plist);
	//DoubleListPrint(plist);
}

void Text4()
{
	DoubleListNode* plist = DoubleListInit();
	DoubleListPushBack(plist, 1);
	DoubleListPushBack(plist, 2);
	DoubleListPushBack(plist, 3);
	DoubleListPushBack(plist, 4);
	DoubleListPushBack(plist, 5);

	DoubleListPrint(plist);

	DoubleListPopFront(plist);
	DoubleListPopFront(plist);
	DoubleListPopFront(plist);

	DoubleListPrint(plist);

}

int main()
{
	//Text1();
	//Text2();
	Text3();
	//Text4();
	return 0;
}
